1. Technical Field
The invention relates to an image processing technique. Particularly, the invention relates to a method and an image processing apparatus for identifying state of macro block of de-interlacing computing.
2. Related Art
To perform de-interlacing computing on a video stream is an important part in an image processing technique. The de-interlacing computing can de-interlace a video stream of an interlacing format into a video stream of a de-interlacing format. To ensure a smooth de-interlacing computing, before the de-interlacing computing is performed on a video frame in the video stream that is to be displayed, a macro block state of each macro block in the video frame can be quickly identified through a mechanism. Generally, a linear approach function (LAF) generator can be used to quickly identify the macro block state of each macro block in the video frame. Such mechanism generally generates a motion flag bit for each macro block to represent the macro block state. Besides, a non-linear approach function generator or other methods can be used to identify the motion flag bit or the state of each macro block. The method used for identifying each of the macro blocks is not limited by the invention, and those skilled in the art should understand that the LAF generator mentioned above is only an example, which is not used to limit the invention.
Generally, the macro block state or the motion flag bit includes a weave state and a bob state. Regarding the macro block with the macro block state of the weave state, during a process of the de-interlacing computing of the macro block, an image processing apparatus combines data of two fields into one frame, which is suitable for the macro blocks with little image variation. On the other hand, regarding the macro block with the macro block state of the bob state, during the process of the de-interlacing computing of the macro block, the image processing apparatus can use data of a single field to form a frame, which is suitable for macro blocks with a constant image variation. In brief, the macro block of the weave state is similar to a static macro block, which has little image variation, for example, a static region in the video frame. The macro block of the bob state is similar to a dynamic macro block, which has large image variation, for example, a dynamic region in the video frame.
However, when the macro block state is misidentified, it severely influences the display quality of the video frame. For example, when the macro block of the weave state is misidentified as a macro block of the bob state, it is liable to have stairs or misaligned bevels on the video frame. Moreover, when the macro block of the bob state is misidentified as a macro block of the weave state, it is liable to have shredded feathers or a rolling edge on the video frame.
Therefore, the conventional technique provides a concept of devour module. After the macro block state of one macro block in the video frame is preliminarily identified, the devour module takes such macro block as a center macro block to compute the number of the macro blocks around the center macro block that are determined to have the weave state or the bob state, and determines whether or not to change the macro block state of the center macro block according to a preset threshold. For example, it is assumed that the macro block state of the center macro block is the weave state, and the number of the macro blocks around the center macro block that are determined to have the weave state is smaller than a weave state threshold, the macro block state of the center macro block is transformed to the bob state. Alternatively, it is assumed that the macro block state of the center macro block is the bob state, and the number of the macro blocks around the center macro block that are determined to have the bob state is smaller than a bob state threshold, the macro block state of the center macro block is transformed to the weave state.
However, in the conventional technique, the threshold used by the devour module is fixed. If the threshold corresponding to the macro blocks of each part in the video frame cannot be adaptively adjusted, it is liable to cause the misidentification, which decreases the display quality of the video frame.